home *** CD-ROM | disk | FTP | other *** search
- Path: soap.news.pipex.net!pipex!usenet
- From: Dirk Wessels <dirk@oxigen.demon.co.uk>
- Newsgroups: comp.lang.c++
- Subject: Re: Will JAVA kill C++?
- Date: 13 Mar 1996 10:40:24 GMT
- Organization: UnipalmPIPEX server (post doesn't reflect views of UnipalmPIPEX)
- Message-ID: <4i68mo$ajp@soap.news.pipex.net>
- References: <31426210.1244@bhp.com.au> <1996Mar12.155442.1839@amc.com> <31462922.21F4A8BD@netcom.com>
- NNTP-Posting-Host: aj156.du.pipex.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1 (Windows; I; 16bit)
-
- Adam Megacz <kalessin@netcom.com> wrote:
- >Curtis Green wrote:
- >
- >> code reliablity is more a function of programmer ability than language
- >> features. I agree that C++ is woefully missing garbage collection but
- >> you can pick up class libraries with those features. A lousy programmer can
- >> write lousy programs in any language.
- >
- >Amen. Also, I believe that every feature in Java can be had in C++
- >merely by adding class libraries and choosing not to use pointers. As
- >for the bytecode stuff, ANDF works just fine for C++. Does anyone know
- >of a feature in Java that C++ can't do (w/o some extra source code)? I'd
- >like to know!
- >
-
- I think you are both missing the point here.
- Java works with references, just like Delphi and Smalltalk.
- C++ works with actual addresses, which do not necessary point to
- objects but also to strings, booleans or start of an array.
- Since any addess may point to something unknown, you can not have
- safe garbage collection.
- The only thing to perform garbage collection in C++ is to use classes
- that handle the references instead of pointers. This is much slower,
- can still easily be misused. And are often not fully functional
- (reference counting).
- Garbage collecting is as good in C++ as in C and Assembler!!
-
- I made a few garbage collectors in C++ myself.
- Try it yourself ... and then let other people use it...
-
-
- Good luck
-
- Dirk Wessels
-
-
-